<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
	<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
	<title></title>
	<link rel="stylesheet" type="text/css" href="../../css/aui.css" />
	<link rel="stylesheet" type="text/css" href="../../css/font-awesome.css" />


</head>

<body>
	<div class="aui-bar aui-bar-nav" id="tab">
    <a class="aui-pull-left aui-btn" id="back" tapmode>
			<span class="aui-iconfont aui-icon-left"></span>
		</a>
		<div class="aui-title">
			<div class="aui-bar aui-bar-btn aui-bar-btn-round">
				<div class="aui-bar-btn-item" id="tab_0">
					普通附件
				</div>
				<div class="aui-bar-btn-item" id="tab_1">
					户籍资料
				</div>
			</div>
		</div>
	</div>

</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/util.js"></script>
<script type="text/javascript" src="../../script/aui-tab.js"></script>

<script type="text/javascript">
	var groupIndex = 0;
	apiready = function() {
		api.parseTapmode();
		$api.fixStatusBar($api.byId('tab'));
		var tab = new auiTab({
			element: document.querySelectorAll(".aui-bar-btn")[0]
		}, function(ret) {
			api.setFrameGroupIndex({
				name: 'person_file_frm',
				index: ret.index - 1
			});
		});

		api.openFrameGroup({
			name: 'person_file_frm',
			rect: {
				x: 0,
				y: $api.offset($api.byId('tab')).h,
				w: 'auto',
				h: 'auto'
			},
			frames: [{
				name: 'list_0', //frame名字，字符串类型，不能为空字符串
				url: 'file.html',
				pageParam: {
					type: 0,
          id:api.pageParam.id
				}
			}, {
				name: 'list_1', //frame名字，字符串类型，不能为空字符串
				url: 'file.html',
				pageParam: {
					type: 1,
          id:api.pageParam.id
				}
			}]
		}, function(ret, err) {
			var footer = $api.byId('tab');
			var footerBar = $api.domAll(footer, 'div');
			for (var j = 0; j < footerBar.length; j++) {
				$api.removeCls(footerBar[j], 'aui-active');
			}
			groupIndex = ret.index;
			$api.addCls($api.byId('tab_' + groupIndex), 'aui-active');
		});

    // 返回按钮
		$api.addEvt($api.byId('back'), 'click', function() {
			api.closeWin();
		});

	};

</script>

</html>
